// To parse this JSON data, do
//
//     final paymentRecordIca = paymentRecordIcaFromJson(jsonString);

import 'dart:convert';

PaymentRecordIca paymentRecordIcaFromJson(String str) =>
    PaymentRecordIca.fromJson(json.decode(str));

String paymentRecordIcaToJson(PaymentRecordIca data) =>
    json.encode(data.toJson());

class PaymentRecordIca {
  PaymentRecordIca({
    this.detail,
    this.email,
    this.extendFlag,
    this.firstName,
    this.lastName,
    this.password,
    this.paymentItem,
    this.phone,
    this.userName,
    this.zipCode,
  });

  List<Detail>? detail;
  String? email;
  bool? extendFlag;
  String? firstName;
  String? lastName;
  String? password;
  String? paymentItem;
  String? phone;
  String? userName;
  String? zipCode;

  factory PaymentRecordIca.fromJson(Map<String, dynamic> json) =>
      PaymentRecordIca(
        detail: json["detail"] == null
            ? []
            : List<Detail>.from(json["detail"]!.map((x) => Detail.fromJson(x))),
        email: json["email"],
        extendFlag: json["extendFlag"],
        firstName: json["firstName"],
        lastName: json["lastName"],
        password: json["password"],
        paymentItem: json["paymentItem"],
        phone: json["phone"],
        userName: json["userName"],
        zipCode: json["zipCode"],
      );

  Map<String, dynamic> toJson() => {
        "detail": detail == null
            ? []
            : List<dynamic>.from(detail!.map((x) => x.toJson())),
        "email": email,
        "extendFlag": extendFlag,
        "firstName": firstName,
        "lastName": lastName,
        "password": password,
        "paymentItem": paymentItem,
        "phone": phone,
        "userName": userName,
        "zipCode": zipCode,
      };
}

class Detail {
  Detail({
    this.number,
    this.planTerm,
    this.planType,
    this.testType,
  });

  int? number;
  int? planTerm;
  String? planType;
  String? testType;

  factory Detail.fromJson(Map<String, dynamic> json) => Detail(
        number: json["number"],
        planTerm: json["planTerm"],
        planType: json["planType"],
        testType: json["testType"],
      );

  Map<String, dynamic> toJson() => {
        "number": number,
        "planTerm": planTerm,
        "planType": planType,
        "testType": testType,
      };
}
